package com.ant.backstage.service;

import com.ant.backstage.facade.ApiReturn;
import com.ant.backstage.facade.dto.UserDTO;
import com.ant.backstage.facade.request.DelGiteeImgRequest;
import com.ant.backstage.facade.request.UploadFileRequest;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public interface FileUploadService {
    void upload(MultipartFile file, String baseDir) throws Exception;

    void download(HttpServletResponse response , String newName) throws IOException;

    ApiReturn uploadAvatarImg(MultipartFile[] file, UserDTO userInfoByToken);

    ApiReturn giteeUploadFile(MultipartFile file, String fileType) throws IOException;

    ApiReturn delGiteeFile(DelGiteeImgRequest request);

    ApiReturn giteeUploadAvatarImg(MultipartFile file, String fileType, String uid) throws IOException;

    ApiReturn saveFileInfo(UploadFileRequest uploadFileRequest, UserDTO userInfoByToken);

}
